<extend name="Base/common_nojhd"/>
<block name="TITLE"><title>完善信息</title></block>
<block name="body">

    <div data-am-widget="list_news" class="am-list-news am-list-news-default">
        <!--列表标题-->
        <div class="am-list-news-hd am-cf">
            <!--带更多链接-->
            <a href="###" class="">
                <h2>开始购物前先完善个人信息</h2>
            </a>
        </div>
        <div class="am-list-news-bd">
            <ul class="am-list">
                <!--缩略图在标题左边-->
                <li class="am-g am-list-item-desced am-list-item-thumbed am-list-item-thumb-left">
                    <div class="am-u-sm-4 am-list-thumb">
                        <a href="#" class="">
                            <img class='am-img-thumbnail am-radius' src="{:session('wxuser.headimgurl')}" 
                                 />
                        </a>
                    </div>
                    <div class=" am-u-sm-8 am-list-main">
                        <h3 class="am-list-item-hd">
                            <a href="#" class="">{:session('wxuser.nickname')}</a>
                        </h3>
                        <div class="am-list-item-text">{:session('wxuser.province')}-{:session('wxuser.city')}</div>
                    </div>
                </li> 
            </ul>
        </div>
        <div class="am-container">
            <form class='am-form editAddress' action="{:U('User/edit')}" method="post">
                <div class="am-form-group">
                    <label for="doc-ipt-email-1">店铺名称</label>
                    <input type="text" class="" id="shopName" name='shopName' placeholder="公司/店铺名称">
                </div>
                <div class="am-form-group">
                    <label for="doc-ipt-pwd-1">联系人姓名</label>
                    <input type="text" class="" id="realName" name='realName' placeholder="请输入联系人姓名">
                </div>                
                <div class="am-form-group">
                    <label for="doc-ipt-pwd-1">联系人电话</label>
                    <input type="text" class="" id="phone"  name='phone' placeholder="联系人电话">
                </div>
                <div class="am-form-group">
                    <label for="doc-select-1">联系地址</label>
                    <select id="province"  name='province'>
                        <option value="江苏省">江苏省</option>                        
                    </select>
                    <span class="am-form-caret"></span>
                     <select id="city"  name='city'>
                         <option value="扬州市">扬州市</option>
                         <option value="泰州市">泰州市</option>
                         <option value="江都市">江都市</option>
                         <option value="仪征市">仪征市</option>
                         <option value="高邮市">高邮市</option>
                         <option value="宝应市">宝应市</option>
                         <option value="镇江市">镇江市</option>
                     </select>
                    <span class="am-form-caret"  name='areastr'></span>
                    <span class="am-form-caret"></span>
                </div>
                <div class="am-form-group">
                   <label for="doc-ta-1">详细地址</label>
                   <textarea class="" rows="5" id="street" name='street'></textarea>
                </div>
                <p style='text-align: center'><button type="submit" class="am-btn am-btn-primary am-btn-lg">提交保存</button></p>
            </form>
        </div>
    </div> 
</block>
<block name="script">
    <script>
        $('.editAddress').submit(function(){
            var shopName = $('#shopName').val();
            var realName = $('#realName').val();
            var phone = $('#phone').val();
            var province = $('#province').val();
            var city = $('#city').val();
            var street = $('#street').val();
            var area = "";
            if (shopName == "" ||realName == "" ||phone == "" ||province == "" ||city == ""||street == ""){
                alert("请完善信息");
                return false;
            }
            return true;
        });
    </script>    
</block>